package com.hclc.entity.model.enums;

import com.fasterxml.jackson.annotation.JsonValue;
import lombok.AllArgsConstructor;


/**
 * @创建人 ws
 * @郵箱 zhisirudan@gmail.com
 * @创建时间 2019/11/9
 */

@AllArgsConstructor
public enum QuartzEnums {
    /**
     * 自动拼团
     */
    //AUTO_SPELL(1, "自动拼团", "com.hclc.pwl.impl.job.AutoSpellGroupJob"),

    /**
     * 自动退款
     */
    //AUTO_REFUND(2, "自动退款", "com.hclc.pwl.impl.job.RefundJob"),

    /**
     * 结算
     */
    //SETTLEMENT(3, "结算", "com.hclc.pwl.impl.job.SettlementJob");
    ;
    @JsonValue
    private final int code;
    private final String desc;
    private final String packageClass;

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public String getPackageClass() {
        return packageClass;
    }

    public static QuartzEnums find(int code) {
        for (QuartzEnums quartzEnums : QuartzEnums.values()) {
            if (quartzEnums.getCode() == code) {
                return quartzEnums;
            }
        }
        return null;
    }
}
